home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (April 1991)
/
HAMCALL CD-ROM (Buckmaster)(April 1991).BIN
/
geograph
/
sunrise
/
read.me
next >
Wrap
Text File
|
1990-10-14
|
11KB
|
282 lines
SUNRISE PROGRAM
by
John Hendrickson
INTRODUCTION
The SUNRISE program will calculate and print the times of sunrise and
sunset for an entire year for a given location on a single 8" by 11"
sheet of paper. The results are extremely accurate, and in most cases
will be well within the nearest minute of the actual times. The
program will compute sunrise and sunset times for any place in the
world, and for any year in the next few centuries.
On most computers it will take about a minute to run; the output will
be sent to your printer, which must be able to support a condensed or
compressed mode. The program uses IBM/Epson escape codes to set your
dot-matrix printer to compressed mode and also instruct it to print
eight lines of text per inch.
To see a quick demonstration, just type DEMO and press the RETURN key.
EXECUTION
To start SUNRISE, just type SR and press RETURN. The program begins
by reading the data file, SR.DAT. After about 20 seconds it will
begin requesting input about the year, location, time zone, and
whether or not daylight-saving time is to be used.
SAMPLE SESSION
A sample interactive session for Indianapolis (which does not
use daylight-saving time) appears below, followed by a more
detailed explanation of each query.
...SUNRISE PROGRAM...
version 2.21
by John Hendrickson
ENTER IN LAST TWO DIGITS OF YEAR? 89
NAME OF LOCATION? Indianapolis, IN.
LATITUDE AND LONGITUDE SHOULD BE ENTERED IN THE FOLLOWING FORMAT LL.MM
WHERE LL IS IN DEGREES, AND MM IS IN MINUTES
LATITUDE? 39.44
LONGITUDE? 86.16
TIME ZONE IS BASED FROM WHICH MERIDIAN? 75
Convert to DAYLIGHT-SAVING TIME... (Y/N)? NO 12 Hour clock
(At this point a menu will appear where additional options can be selected).
DETAILS ON ENTERING IN DATA
When SUNRISE is first started, the data file SR.DAT is read by the
program. After about 20 seconds, you will be will be prompted to enter
the last two digits of the year for which you want to calculate. You
can either enter all four digits (e.g. 1989), or two digits (e.g. 89).
If you simply enter a carriage return without typing any data, the
current year (from the system clock) will be used.
Next you will be asked for the name of the location. You can type in
anything here. Whatever you type will be the name that is used on the
Sunrise/Set printout.
Then you will be asked the latitude and then the longitude of the
subject location. Both the latitude and longitude should be entered in
degrees and minutes (e.g. 39 degrees, 44 minutes would be entered in as
39.44). Use negative numbers for locations in the eastern or southern
hemisphere.
Now you will be prompted to enter in the meridian (longitude) for the
desired time zone. Below are some values that you would use for time
zones near the United States. Just enter the appropriate number.
GMT would be 0 degrees (Greenwich Mean time)
AST would be 60 degrees (Atlantic Standard Time)
EST would be 75 degrees (Eastern Standard Time)
CST would be 90 degrees (Central Standard Time)
MST would be 105 degrees (Mountain Standard Time)
PST would be 120 degrees (Pacific Standard Time)
YST would be 135 degrees (Yukon Standard Time)
HST would be 150 degrees (Hawaii, and Alaska Standard Time)
If you have selected a location near North America, you will then be
asked whether or not you want to adjust for daylight-saving time.
Enter a "Y" or a "y" if you want the output to reflect
Daylight-Saving Time. Any other keys will mean NO.
Note: Daylight-Saving Time is not used in other parts of the world
outside of the continental United States or Alaska. The
daylight-saving time option will add 1 hour to all the times between 2
AM on the first Sunday in April, and 2 AM on the last Sunday in
October.
You can also force daylight-saving time by typing:
SR YES when you first start Sunrise.
The "YES" will always turn on daylight-saving time no matter the
location. Typing SR NO will always force daylight-saving time off.
USE OF THE MENU
A menu has been provided so that you rerun the program several times
without entering all new data. If you are just printing out the
Sunrise/Set times for one location, you can ignore this section; just
hit any key other than F1 through F8 to continue.
After all of the data is entered, a menu will appear on the screen that
looks something like this:
HIT ONE OF THE FOLLOWING KEYS:
F1 - to change year F2 - to change location
F3 - to change time zone F4 - to toggle daylight-saving time
F5 - to re-enter all new data F6 - toggle between 12/24 hour clock
F7 - change output device or file F8 - Print Sunrise/Set times and
ESC- to end program then return to menu
-OR-
HIT ANY OTHER KEY TO PRINT SUNRISE/SET TIMES...Program will end upon
completion.
Here is a brief description of each:
F1- Will only allow you to reenter the year. Nothing else will be
changed. Afterwards, you can select another menu option.
F2- Will only allow you to change locations. Everything else will
remain the same. Afterwards, you can select another menu option.
F3- Will only allow you to change time zones. Afterwards, you can
select another menu option.
F4- Will toggle daylight-saving time to YES or NO.
F5- Use this option if you want to enter all new data without exiting
and restarting the program. This way the data file SR.DAT does
not have to be reread.
F6- Will temporarily change the default output device or file to
something else. This change will only remain in effect until you
exit the program. To make this change permanent you must edit
SR.DAT and change LPT1 to something else. SEE REDIRECTING OUTPUT
FOR MORE DETAIL ON THIS.
F7- Will toggle the printout to a 12 hour or 24 hour clock.
F8- This will print out Sunrise/Set times for the location, year and
other options you have selected. After the table has been
printed, the menu will reappear on the screen so you can make
changes for your next run.
ESC Will end the program immediately.
HITTING ANY OTHER KEY than one of the function keys will also print out
the Sunrise/Set times. However, the program will terminate upon
completion.
REDIRECTING OUTPUT TO ANOTHER DEVICE OR FILE
The SUNRISE standard output is normally sent to the LPT1 device
(printer 1). However, if you are printing out a large number of
Sunrise/Set charts at one time, you may want to redirect the output to a
file rather than to the printer. By redirecting the printout to a file,
you do not have to wait for each chart to print, since they will store
much faster on a disk. After you are done, you can copy this file to the
printer and each chart will print out without your assistance.
To temporarily redirect the output to a file or another device, just hit
the hit the "F7 Key" when the menu appears. It will next display the
current output device or file and then prompt you on what you want to
change it to. If you do not want to make any changes just hit enter to
continue. Otherwise type in the name of the file or device. MAKE SURE
WHATEVER YOU TYPE, IS A VALID DOS EXPRESSION.
This change will remain in effect until you exit the program.
You can also make this change permanent by editing the SR.DAT data file.
All you have to do is to change "LPT1" near the end of this file SR.DAT,
to another name. A backup copy of SR.DAT should be first made in case
this file is accidentally damaged. Be sure to use a true ASCII text
editor and change nothing else in this file.
TWELVE AND 24 HOUR CLOCK
Normally this program will print out the Sunrise/Set times in a 12 hour
clock mode. However, you can toggle it to a 24 hour clock or back by
hitting the "F6 Key" when the menu appears. This change will only remain
in effect until you exit the program.
If you desire to only use the 24 hour clock mode, you can change this
default setting to the 24 hour mode by editing SR.DAT. At the very end
of SR.DAT is the number 12. Just change this to 24. Make sure nothing
else is changed and you are using a true ASCII text editor. Also keep a
backup copy of this file (SR.DAT) in case it is accidentally damaged.
USING BATCH FILES
Batch files can be used along with redirected input files to process
Sunrise/Set tables automatically. The sample file, DEMO.BAT, will run
the SUNRISE program using INDY.DAT to provide all the input.
Other batch files can be created, along with additional input files, to
process many different locations and/or years at one time, automatically.
NOTE...The menu keys cannot work from the batch file. If you want to use
daylight-saving time from the batch file you must type type in
SR <INFILE YES The "INFILE" is the name of the input file.
The "YES" will force daylight-saving time on.
Also to use the 24 hour clock or another device or file instead of
printer 1 for your output, you must edit SR.DAT beforehand.
NOTE ON NON-IBM or NON-EPSON COMPATIBLE PRINTERS
When the data is printed out. Escape codes are used to place the printer
in compressed mode, and instruct it to print eight lines per inch. This
is necessary since each of the 78 lines is about 130 columns long. You
should have no problems if you are using an Epson or IBM Compatible dot
matrix printer. However, other types of printers may fail to recognize
these codes.
OTHER INFORMATION
This program should run on just about any IBM compatible computer using
PC or MS DOS 2.0 or later.
There is no charge for SUNRISE. However, if you find this program
useful, a $10.00 contribution would be greatly appreciated. Also you can
send any suggestions for future improvement to me at the following
address:
John Hendrickson
7715 White Dove Dr.
Indianapolis, In. 46256